home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15279 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: casbah.acns.nwu.edu!muzaffar
  2. From: muzaffar@casbah.acns.nwu.edu (Usman Muzaffar)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: A real basic problem:  long integers or compiler problem?
  5. Date: 18 Apr 1996 09:00:55 GMT
  6. Organization: Northwestern University, Evanston IL
  7. Message-ID: <4l50c7$10r@news.acns.nwu.edu>
  8. References: <4l3mom$f26@newsbf02.news.aol.com>
  9. NNTP-Posting-Host: casbah.acns.nwu.edu
  10.  
  11. In article <4l3mom$f26@newsbf02.news.aol.com>,
  12. The Oder <theoder@aol.com> wrote:
  13. >I'm in the process of relearning C and have been doing some beginning
  14. >programs on my PC.  I have two compilers (Borland C++ and Power C).  My
  15. >problem is that when I run a program using "long" integers (i.e. declare a
  16. >variable as "long"), it locks up immediately and I have to reboot.  This
  17. >has happened with both compilers and with two different really basic
  18. >programs (i.e. just trying to do a loop that will compute the first 10
  19. >powers of 2, and another one that simply just tries to find the largest
  20. >positive long value on my computer--> I can find the largest positive int
  21. >value, but when I convert it to long, it locks up)
  22. >
  23. >Is this a problem I have with BOTH (?!?!) compilers, is it my computer
  24. >(486-DX2, 8 megs RAM) or settings, or is it just something I haven't
  25. >learned yet about long integers?  One of these programs I copied directly
  26. >from one of TWO books I'm using and it just locks up!
  27. >
  28. >Thanks.
  29.  
  30. It makes no sense to describe this program and not post it.
  31. Just declaring a variable long certainly shouldn't crash your system.
  32. Give us the code and someone might be able to help.
  33.  
  34.  
  35.  
  36.